﻿CREATE TABLE [dbo].[Valdistrikt] (
    [Id]            UNIQUEIDENTIFIER NOT NULL,
    [ValId]         UNIQUEIDENTIFIER NOT NULL,
    [Skapad]        DATETIME         NOT NULL,
    [SkapadAv]      NVARCHAR (50)    NOT NULL,
    [Andrad]        DATETIME         NULL,
    [AndradAv]      NVARCHAR (50)    NULL,
    [BemanningKlar] BIT              NOT NULL,
    [ForsamlingId]  UNIQUEIDENTIFIER NOT NULL,
    [ValdistriktNr] NVARCHAR (50)    NULL,
    CONSTRAINT [PK_Valdistrikt] PRIMARY KEY CLUSTERED ([Id] ASC, [ValId] ASC),
    CONSTRAINT [FK_Valdistrikt_Forsamling] FOREIGN KEY ([ForsamlingId], [ValId]) REFERENCES [dbo].[Forsamling] ([Id], [ValId])
);









